<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>获取基金排行</title>
  </head>
  <body>
    <h1>获取基金排行，并同步到数据库</h1>
    <p><%=test%></p>
    <p id="rankDataText"><%=rankDataText%></p>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/dayjs/1.10.3/dayjs.min.js"></script>
    <script>
      var rankDataText = document.getElementById("rankDataText").innerText;

      eval(rankDataText);

      console.log("rankData", rankData);

      var rankArray = rankData.datas;

      axios
        .post("/v1/reptile/postFundRankToSql", {
          fundRankArray: rankArray,
        })
        .then(function (response) {
          console.log(response);
        })
        .catch(function (error) {
          console.log(error);
        });
    </script>
  </body>
</html>
